home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / widget / nsIKBStateControl.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  3KB  |  95 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Frank Tang <ftang@netscape.com>
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  27.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the MPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the MPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38.  
  39. #ifndef nsIKBStateControl_h__
  40. #define nsIKBStateControl_h__
  41.  
  42. #include "nsISupports.h"
  43.  
  44. // {6A9AC731-988A-11d3-86CC-005004832142}
  45. #define NS_IKBSTATECONTROL_IID \
  46. { 0x6a9ac731, 0x988a, 0x11d3, \
  47. { 0x86, 0xcc, 0x0, 0x50, 0x4, 0x83, 0x21, 0x42 } }
  48.  
  49.  
  50. /**
  51.  * interface to control keyboard input state
  52.  */
  53. class nsIKBStateControl : public nsISupports {
  54.  
  55.   public:
  56.  
  57.     NS_DEFINE_STATIC_IID_ACCESSOR(NS_IKBSTATECONTROL_IID)
  58.  
  59.     /*
  60.      * Force Input Method Editor to commit the uncommited input
  61.      */
  62.     NS_IMETHOD ResetInputState()=0;
  63.  
  64.     /*
  65.      * Following methods relates to IME 'Opened'/'Closed' state.
  66.      * 'Opened' means the user can input any character. I.e., users can input Japanese  
  67.      * and other characters. The user can change the state to 'Closed'.
  68.      * 'Closed' means the user can input ASCII characters only. This is the same as a
  69.      * non-IME environment. The user can change the state to 'Opened'.
  70.      * For more information is here.
  71.      * http://bugzilla.mozilla.org/show_bug.cgi?id=16940#c48
  72.      */
  73.  
  74.     /*
  75.      * Set the state to 'Opened' or 'Closed'.
  76.      * If aState is TRUE, IME open state is set to 'Opened'.
  77.      * If aState is FALSE, set to 'Closed'.
  78.      */
  79.     NS_IMETHOD SetIMEOpenState(PRBool aState) = 0;
  80.  
  81.     /*
  82.      * Get IME is 'Opened' or 'Closed'.
  83.      * If IME is 'Opened', aState is set PR_TRUE.
  84.      * If IME is 'Closed', aState is set PR_FALSE.
  85.      */
  86.     NS_IMETHOD GetIMEOpenState(PRBool* aState) = 0;
  87.  
  88.     /*
  89.      * Destruct and don't commit the IME composition string.
  90.      */
  91.     NS_IMETHOD CancelIMEComposition() = 0;
  92. };
  93.  
  94. #endif // nsIKBStateControl_h__
  95.